|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--cnrg.itx.ds.Digits
This class provides an abstraction to digits
| Constructor Summary | |
Digits(int num)
Constructor for integer. |
|
Digits(int[] n)
Constructor for integer array |
|
Digits(java.lang.String num)
Constructor for string of digits. |
|
| Method Summary | |
int |
count()
Count the number of digits in this digits object |
boolean |
equals(Digits digits)
Compare with other digits instance to determine if they are identical |
int[] |
getArray()
Returns itself represented as an array of int |
int |
getValue()
Get the digits value |
java.lang.String |
toString()
Returns itself represented as a string |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public Digits(java.lang.String num)
num - string of digitspublic Digits(int num)
num - integer valuepublic Digits(int[] n)
n - array of int| Method Detail |
public int getValue()
public int count()
public int[] getArray()
public java.lang.String toString()
public boolean equals(Digits digits)
digits - another digits object to be compared
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||